package com.car.account.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.car.account.controller.form.adminForm.AdminCodeLoginForm;
import com.car.account.controller.form.adminForm.AdminPassLoginForm;
import com.car.account.dto.adminDto.AdminDto;
import com.car.account.dto.adminDto.SelectAdminDto;
import com.car.account.dto.userDto.UserInfoByIdDto;
import com.car.account.dto.userDto.UserInfoDto;
import com.car.account.entity.Admin;
import com.baomidou.mybatisplus.extension.service.IService;
import com.car.account.entity.PlatformRole;
import com.car.account.param.adminParam.InsertAdminParam;
import com.car.account.param.adminParam.SelectAdminDtoParam;
import com.car.account.param.adminParam.UpdateRoleParam;
import com.car.account.param.userParam.SelectUserInfoDtoParam;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Set;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 董旭
 * @since 2024-08-28
 */
public interface AdminService extends IService<Admin> {

    Integer adminPassLogin(AdminPassLoginForm form)throws Exception;

    void sendAdminLoginCode(String adminPhone)throws Exception;

    Integer adminCodeLogin(AdminCodeLoginForm form)throws Exception;

    void disableUserByUserId(Integer adminId, Integer userId)throws Exception;

    void enableUserByUserId(Integer adminId, Integer userId)throws Exception;

    void deleteUserByUserId(Integer adminId, Integer userId)throws Exception;

    void silenceUserByUserId(Integer adminId, Integer userId)throws Exception;

    void unbanUserByUserId(Integer adminId, Integer userId)throws Exception;

    UserInfoByIdDto adminSelectUserInfoDtoById(Integer adminId, Integer userId)throws Exception;

    Page<UserInfoDto> adminSelectUserInfoDto(SelectUserInfoDtoParam param)throws Exception;

    void updateAdminPhoneById(Integer adminId, String adminPhone)throws Exception;

    void updateAdminPassById(Integer adminId, String adminPass)throws Exception;

    String adminUpdateImage(MultipartFile mf, Integer adminId)throws Exception;

    List<PlatformRole> selectAdminRole(Integer adminId)throws Exception;

    void insertAdmin(InsertAdminParam param)throws Exception;

    void disableAdmin(Integer currentAdminId, Integer adminId)throws Exception;

    void enableAdmin(Integer currentAdminId, Integer adminId)throws Exception;

    void deleteAdmin(Integer currentAdminId, Integer adminId)throws Exception;

    AdminDto selectAdminDto(Integer adminId)throws Exception;

    Page<SelectAdminDto> selectAdmins(SelectAdminDtoParam param)throws Exception;

    List<SelectAdminDto> findsAdminByIds(Integer currentAdminId, Set<Integer> adminIds)throws Exception;

    Integer selectAdminAllRole(Integer currentAdminId, Integer adminId)throws Exception;

    void updateAdminRole(UpdateRoleParam param)throws Exception;
}
